package com.example.daibanshiwu.pojo;

import java.sql.Timestamp;
import java.util.List;

public class Message {
    private int messageId;    // 事务id
    private String id;
    private String title; // 事务标题
    private String transactionType;  // 事务类型
    private List<Integer> groupIds; // 接收小组ID列表
    private int groupId;   // 组id
    private int receiverUserId; // 接收者id
    private String status;  // 事务状态
    private String importance; // 重要程度
    private int senderUserId;  // 消息发送者
    private Timestamp sendTime;  // 发送时间
    private Timestamp startTime;  // 开始时间
    private Timestamp endTime;  // 截至时间
    private MessageChild messageChild;  // 消息子表
    private File file;  // 文件表

    public Message() {}

    public Message(int messageId, String title, int groupId, String transactionType, int receiverUserId, String status, String importance, int senderUserId, Timestamp sendTime, Timestamp startTime, Timestamp endTime, MessageChild messageChild, File file) {
        this.messageId = messageId;
        this.title = title;
        this.groupId = groupId;
        this.transactionType = transactionType;
        this.receiverUserId = receiverUserId;
        this.status = status;
        this.importance = importance;
        this.senderUserId = senderUserId;
        this.sendTime = sendTime;
        this.startTime = startTime;
        this.endTime = endTime;
        this.messageChild = messageChild;
        this.file = file;
    }

    public Message(int messageId, String title, String transactionType, List<Integer> groupIds, String status, String importance, int sendUserId, Timestamp startTime, Timestamp sendTime, Timestamp endTime, MessageChild messageChild, File file) {
        this.messageId = messageId;
        this.title = title;
        this.transactionType = transactionType;
        this.groupIds = groupIds;
        this.status = status;
        this.importance = importance;
        this.startTime = startTime;
        this.sendTime = sendTime;
        this.endTime = endTime;
        this.messageChild = messageChild;
        this.file = file;
    }

    public Message(int groupId, int messageId, String id, String title, String transactionType, List<Integer> groupIds, int receiverUserId, String status, String importance, int senderUserId, Timestamp sendTime, Timestamp startTime, Timestamp endTime, MessageChild messageChild, File file) {
        this.groupId = groupId;
        this.messageId = messageId;
        this.id = id;
        this.title = title;
        this.transactionType = transactionType;
        this.groupIds = groupIds;
        this.receiverUserId = receiverUserId;
        this.status = status;
        this.importance = importance;
        this.senderUserId = senderUserId;
        this.sendTime = sendTime;
        this.startTime = startTime;
        this.endTime = endTime;
        this.messageChild = messageChild;
        this.file = file;
    }

    public int getMessageId() {
        return messageId;
    }

    public void setMessageId(int messageId) {
        this.messageId = messageId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTransactionType() {
        return transactionType;
    }

    public void setTransactionType(String transactionType) {
        this.transactionType = transactionType;
    }

    public List<Integer> getGroupIds() {
        return groupIds;
    }

    public void setGroupIds(List<Integer> groupIds) {
        this.groupIds = groupIds;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public int getReceiverUserId() {
        return receiverUserId;
    }

    public void setReceiverUserId(int receiverUserId) {
        this.receiverUserId = receiverUserId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getImportance() {
        return importance;
    }

    public void setImportance(String importance) {
        this.importance = importance;
    }

    public int getSenderUserId() {
        return senderUserId;
    }

    public void setSenderUserId(int senderUserId) {
        this.senderUserId = senderUserId;
    }

    public Timestamp getSendTime() {
        return sendTime;
    }

    public void setSendTime(Timestamp sendTime) {
        this.sendTime = sendTime;
    }

    public Timestamp getStartTime() {
        return startTime;
    }

    public void setStartTime(Timestamp startTime) {
        this.startTime = startTime;
    }

    public Timestamp getEndTime() {
        return endTime;
    }

    public void setEndTime(Timestamp endTime) {
        this.endTime = endTime;
    }

    public MessageChild getMessageChild() {
        return messageChild;
    }

    public void setMessageChild(MessageChild messageChild) {
        this.messageChild = messageChild;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    @Override
    public String toString() {
        return "Message{" +
                "messageId=" + messageId +
                ", id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", transactionType='" + transactionType + '\'' +
                ", groupIds=" + groupIds +
                ", groupId=" + groupId +
                ", receiverUserId=" + receiverUserId +
                ", status='" + status + '\'' +
                ", importance='" + importance + '\'' +
                ", senderUserId=" + senderUserId +
                ", sendTime=" + sendTime +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", messageChild=" + messageChild +
                ", file=" + file +
                '}';
    }
}
